# -*- coding: utf-8 -*
# 游戏数据
#!/usr/bin/python3

class InternalMumber:
    game_data = None
    game_result = None
    def __init__(self):
        self.game_data = [[0,0,3,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
        self.game_result = 0


class GameData:

    __internal_mumber = None

    @staticmethod
    def Clear():
        global __internal_mumber
        # print(__internal_mumber.game_data)
        # print(__internal_mumber.game_result)
        __internal_mumber.game_data = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
        print("GameData.Clear()")

    @staticmethod
    def InitFunc():
        global __internal_mumber
        __internal_mumber = InternalMumber()

    @staticmethod
    def SetGameData(data):
        global __internal_mumber
        print(data)
        print(type(__internal_mumber.game_data))
        print(type(data))
        if type(__internal_mumber.game_data) is not type(data):
            print("error GameData.SetGameData() type is different",data)
            return
        elif len(__internal_mumber.game_data) != len(data):
            print("error GameData.SetGameData() size is different",data)
            return
        __internal_mumber.game_data = data
        return

    # 获取游戏数据
    # 返回一个tuple，只能读。设置游戏数据使用SetGameData
    @staticmethod
    def GetGameData():
        global __internal_mumber
        return __internal_mumber.game_data


    # 设置最高分数
    @staticmethod
    def SetResult(result):
        global __internal_mumber
        __internal_mumber.game_result = str(result)
        return

    # 获取最高分数
    @staticmethod
    def GetResult():
        global __internal_mumber
        return __internal_mumber.game_result

    @staticmethod
    def TestFunc(data):
       GameData.SetGameData(data)



GameData.InitFunc()
GameData.Clear()
# GameData.Clear()
# print(GameData.GetGameData())
# GameData.SetResult("result")
# print(GameData.GetResult())
# GameData.SetGameData([[0,0,3,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]])
# GameData.TestFunc(GameData.GetGameData())